<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8" %>
<%@ include file="/WEB-INF/pages/common/includes/taglibs.jsp" %>
<tags:calendar />

<div class="form-title">
  <h1 class="register">入力内容を確認する</h1>
</div>
<form:form modelAttribute="doctorForm">
  <div class="form-container">
    <div class="navigation small">
      <p>入力内容を確認してください。入力内容に間違いがなければ、「登録する」ボタンを押下してください。</p>
    </div>
    <table class="form">
      <tr>
        <th>氏名</th>
        <td><c:out value="${doctorForm.doctor.familyName}" />&nbsp;&nbsp;<c:out value="${doctorForm.doctor.firstName}" /></td>
      </tr>
      <tr>
        <th>生年月日</th>
        <td><c:if test="${not empty doctorForm.doctor.birthDate}"><fmt:parseDate var="BIRTH_DATE" value="${doctorForm.doctor.birthDate}" type="DATE" /><fmt:formatDate value="${BIRTH_DATE}" pattern="${DATE_PATTERN}" /></c:if><c:if test="${empty doctorForm.doctor.birthDate}">非公開</c:if></td>
      </tr>
      <tr>
        <th>性別</th>
        <td><c:if test="${not empty doctorForm.doctor.sex}"><tags:sex value="${doctorForm.doctor.sex}" /></c:if><c:if test="${empty doctorForm.doctor.sex}">非公開</c:if></td>
      </tr>
    </table>
    <table class="form contentsmargintop">
      <tr>
        <th>専門診療科目</th>
        <td>
          <c:forEach var="division" items="${doctorForm.divisions}">
            <c:out value="${division.name}" /><br/>
          </c:forEach>
        </td>
      </tr>
    </table>
    <table class="form contentsmargintop">
      <tr>
        <th>メールアドレス</th>
        <td><c:out value="${doctorForm.doctor.email}" /></td>
      </tr>
      <tr>
        <th>ホームページ</th>
        <td>
          <c:if test="${not empty doctorForm.doctor.url}">
            <a href="<c:out value='${doctorForm.doctor.url}' />" target="_blank"><c:out value="${doctorForm.doctor.url}" /></a>
          </c:if>
        </td>
      </tr>
      <tr>
        <th>ブログ</th>
        <td>
          <c:if test="${not empty doctorForm.doctor.blog}">
            <a href="<c:out value='${doctorForm.doctor.blog}' />" target="_blank"><c:out value="${doctorForm.doctor.blog}" /></a>
          </c:if>
        </td>
      </tr>
      <tr>
        <th>Twitter アカウント</th>
        <td>
          <c:if test="${not empty doctorForm.doctor.twitter}">
            <a href="http://www.twitter.com/<c:out value='${doctorForm.doctor.twitter}' />" target="_blank">@<c:out value="${doctorForm.doctor.twitter}" /></a>
          </c:if>
        </td>
      </tr>
      <tr>
        <th>Facebook アカウント</th>
        <td><c:out value="${doctorForm.doctor.facebook}" /></td>
      </tr>
    </table>
    <table class="form contentsmargintop">
      <tr>
        <th>PR</th>
        <td><pre><c:out value="${doctorForm.doctor.pr}" /></pre></td>
      </tr>
    </table>
  </div>
  <div class="button-container">
    <c:if test="${empty doctorForm.doctor.id}">
      <button type="submit" name="_eventId_create">登録する</button>
    </c:if>
    <c:if test="${not empty doctorForm.doctor.id}">
      <button type="submit" name="_eventId_update">登録する</button>
    </c:if>
    <button type="submit" name="_eventId_backToForm">戻る</button>
  </div>
</form:form>
